package com.useeinfo.oa.modules.maintaining.thread.task;

import com.useeinfo.oa.modules.maintaining.biz.PeriodInstallBiz;
import com.useeinfo.oa.modules.maintaining.entity.PlannerOrder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OrderTask implements Runnable {
    private final static Logger logger = LoggerFactory.getLogger(OrderTask.class);

    private volatile PeriodInstallBiz periodInstallBiz;

    private PlannerOrder plannerOrder;

    public OrderTask(PeriodInstallBiz periodInstallBiz, PlannerOrder plannerOrder) {
        this.periodInstallBiz = periodInstallBiz;
        this.plannerOrder = plannerOrder;
    }

    @Override
    public void run() {
        try {
            periodInstallBiz.executeOrder(plannerOrder);
        } catch (Exception e) {
            logger.info("创建工单线程失败");
        }
    }
}
